function [ triangleMask ] = triangle(n,h,x0,y0);
    triangleMask = zeros(n,n);
    for i = 1:n
        xi = i-n/2;
        for j = 1:n
            yj = j-n/2;
            r = sqrt((xi-x0)^2+(yj-y0)^2);
            if r<=(h) 
                triangleMask(i,j) = h-r;
            end
        end
    end
    triangleMask = triangleMask./max(triangleMask(:));
end

